<?xml version="1.0" encoding="UTF-8"?>
<!-- 
    Document   : results
    Created on : 23-Sep-2009, 13:34:15
    Author     : me
-->
<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ice="http://www.icesoft.com/icefaces/component" xmlns:jsp="http://java.sun.com/JSP/Page">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
        <ice:portlet>
            <ice:outputStyle href="/resources/xp-portlet.css" id="outputStyle1"/>
            <ice:form id="form1">
                <ice:commandLink action="#{WorkflowResultsPage.showJobs}" value="View submitted jobs"/>
                <ice:panelGrid cellpadding="30px" columns="3">
                    <ice:panelGrid>
                        <br/>
                        <ice:dataTable binding="#{WorkflowResultsPage.resultsTable}" columnWidths="1px, 35px, 140px, 75px, 25px, 25px" id="resultsTable"
                                       rendered="#{WorkflowResultsPage.jobsVis}" scrollHeight="350px" scrollable="true" var="item">
                            <ice:rowSelector toggleOnClick="false"/>
                            <ice:column>
                                <f:facet name="header">
                                    <ice:outputText value="Job ID"/>
                                </f:facet>
                                <ice:outputText value="#{item.ID}"/>
                            </ice:column>
                            <ice:column>
                                <f:facet name="header">
                                    <ice:outputText value="Workflow"/>
                                </f:facet>
                                <ice:outputText value="#{item.workflow}"/>
                            </ice:column>
                            <ice:column style="text-align:center">
                                <f:facet name="header">
                                    <ice:outputText value="Status"/>
                                </f:facet>
                                <ice:outputText value="#{item.status}"/>
                            </ice:column>
                            <ice:column style="text-align:center">
                                <ice:commandButton image="/resources/icons/png/16x16/View.png" action="#{WorkflowResultsPage.showOutputs}"  title="View outputs"/>
                            </ice:column>
                            <ice:column style="text-align:center">
                                <ice:commandButton image="/resources/icons/png/16x16/Delete.png" action="#{WorkflowResultsPage.confirmDelete}" title="Delete Job"/>
                            </ice:column>
                        </ice:dataTable>
                    </ice:panelGrid>
                    <table cellpadding="50">
                        <tr>
                            <td>     </td>
                            <td></td>
                        </tr>
                    </table>
                    <ice:panelGrid>
                        <ice:outputText binding="#{WorkflowResultsPage.outs}" style="font-weight:bold; color:green;"/>
                        <ice:dataTable binding="#{WorkflowResultsPage.outputsTable}" columnWidths="125px, 25px" id="f" rendered="#{WorkflowResultsPage.outsVis}"
                                       scrollHeight="350px" scrollable="true" var="item1">
                            <ice:column>
                                <f:facet name="header">
                                    <ice:outputText binding="#{WorkflowResultsPage.outHeader}"/>
                                </f:facet>
                                <ice:outputText value="#{item1.value}"/>
                            </ice:column>
                            <ice:column style="text-align:center">
                                <f:facet name="header">
                                    <ice:commandButton image="#{WorkflowResultsPage.errorsIcon}" title="#{WorkflowResultsPage.errorsMessage}"/>
                                </f:facet>

                                <h:graphicImage url="/resources/icons/png/16x16/Error.png" title="Error message" rendered="#{item1.containsError}" />

                            </ice:column>
                        </ice:dataTable>
                    </ice:panelGrid>
                </ice:panelGrid>

                <ice:panelPopup id="modalPnlPop"
                                draggable="false" modal="true"
                                visible="#{WorkflowResultsPage.popupVis}">
                    <f:facet name="header">
                        <ice:panelGroup>
                            <ice:outputText
                                value="Warning!"/>
                        </ice:panelGroup>
                    </f:facet>
                    <f:facet name="body">
                        <ice:panelGroup styleClass="icePnlPopBody">
                            <ice:outputText value="Are you sure you want to delete this job?" style="font-weight:bold"/><br/>
                            <ice:commandButton action="#{WorkflowResultsPage.deleteJob}" id="modalPnlCloseButton" type="submit"
                                               value="OK"/>
                            <ice:commandButton type="submit"
                                               value="Cancel" action="#{WorkflowResultsPage.cancelDelete}"/>
                        </ice:panelGroup>
                    </f:facet>
                </ice:panelPopup>

            </ice:form>
        </ice:portlet>
    </f:view>
</jsp:root>
